- 
                Notifications
    
You must be signed in to change notification settings  - Fork 3
 
Dmp 5271 add api validation get transcriptions document #3093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Dmp 5271 add api validation get transcriptions document #3093
Conversation
…en — apply input validation (High) Added input validation to get transcription document as well as ensuring response codes are single quoted
…en — apply input validation (High) Added input validation to get transcription document as well as ensuring response codes are single quoted
…en — apply input validation (High) Added input validation to get transcription document as well as ensuring response codes are single quoted
…en — apply input validation (High) Added input validation to get transcription document as well as ensuring response codes are single quoted
…scriptionsDocument' into DMP-5271-AddApiValidationGetTranscriptionsDocument
| ).build(); | ||
| 
               | 
          ||
| @Test | ||
| void negativeTranscriptionId() { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add to the method name the name of the method for controllers get transcription document which I think is attachTranscript
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test will not reach the controller but I have updated the naming to be clearer
…scriptionsDocument' into DMP-5271-AddApiValidationGetTranscriptionsDocument
…scriptionsDocument' into DMP-5271-AddApiValidationGetTranscriptionsDocument
        
          
                ...k/gov/hmcts/darts/transcriptions/controller/TranscriptionControllerGetTranscriptionTest.java
          
            Show resolved
            Hide resolved
        
              
          
                ...nscriptions/controller/TranscriptionControllerUpdateTranscriptionWithTranscriberIntTest.java
          
            Show resolved
            Hide resolved
        
      | - "Too many results" | ||
| - "Transcription document marked for deletion reason not found" | ||
| - "Failed to upload transcript" | ||
| - "Invalid transcription id" | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there an extra whitespace here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed whitespace
…scriptionsDocument' into DMP-5271-AddApiValidationGetTranscriptionsDocument
…en — apply input validation (High) Added input validation to get transcription document as well as ensuring response codes are single quoted
…en — apply input validation (High) Added input validation to get transcription document as well as ensuring response codes are single quoted
…en — apply input validation (High) Added input validation to get transcription document as well as ensuring response codes are single quoted
…en — apply input validation (High) Added input validation to get transcription document as well as ensuring response codes are single quoted
3cdf6b3    to
    8c408b7      
    Compare
  
    …scriptionsDocument' into DMP-5271-AddApiValidationGetTranscriptionsDocument
JIRA link (if applicable)
https://tools.hmcts.net/jira/browse/DMP-5271
Change description
Added input validation to get transcription document as well as ensuring response codes are single quote
Authorisation.implto handle negative transcription IDs by throwing a BadRequestException.swagger-request-validator-corelibrary and tests inTranscriptionOpenApiContractTestto confirm that minimum and maximum values checking is applied. Note this only validatestranscriptions.yamland not the response returned by the application. Further integration tests were added inTranscriptionControllerDownloadTranscriptIntTestto confirm that the actual response for a negative transcription ID is a 400. The application already handles requests with a transcription ID that is higher than the maximum allowed value with a 400 response.Does this PR introduce a breaking change? (check one with "x")